﻿using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;

namespace Core.Framework.Util.Common
{
    public static partial class assembly
    {
        /// <summary>
        /// 获取对象指定字段
        /// </summary>
        /// <param name="that"></param>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        //public static object GetValueByField<T>(this T that, string name, 
        //    BindingFlags flag = BindingFlags.Public)
        //{
        //    var field = typeof(T).GetField(name, flag | BindingFlags.Instance);

        //    return field.GetValue(that);
        //}
    }
}
